/**
*      author: Y_Yao
*      created: 2024-12-28 20:00:16
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
int a,b,c,d;
int cnt[13 + 5];

void solve()
{
    cin >> a >> b >> c >> d;
    cnt[a]++;
    cnt[b]++;
    cnt[c]++;
    cnt[d]++;
    int flag = 1;
    for(int i = 1;i <= 13;i++)
    {
        if(cnt[i] == 3)
        {
            cout << "Yes" << endl;
            return;
        }
        if(cnt[i] == 2)
        {
            if(flag == 0)
            {
                cout << "Yes" << endl;
                return;
            }
            flag = 0;
        }
    }

    cout << "No" << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}